package com.gxh.controller.admin;

import com.gxh.dto.FeedbackPageQueryDTO;
import com.gxh.result.PageResult;
import com.gxh.result.Result;
import com.gxh.service.FeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/feedback")
@Slf4j
@Api(tags = "后台反馈接口")
public class FeedbackController {

    @Autowired
    private FeedbackService feedbackService;

    /**
     * 分页查询
     * @param feedbackPageQueryDTO
     * @return
     */
    @GetMapping("/page")
    @ApiOperation("分页查询")
    public Result<PageResult> page(FeedbackPageQueryDTO feedbackPageQueryDTO){
        log.info("反馈分页查询:{}", feedbackPageQueryDTO);
        PageResult pageResult = feedbackService.pageQuery(feedbackPageQueryDTO);
        return Result.success(pageResult);
    }

}
